package com.hxit.common.vo;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;


@Data
@NoArgsConstructor
@AllArgsConstructor
public class Result implements Serializable {
    private static final long serialversionUID=1L;
    private Integer code;
    private String message;
    private Object data;
    public static Result ok(Object data){
        return  new Result(0,"操作成功",data);
    }
    public static Result ok(){
        return ok(null);
    }
    public static Result fail(Object data){
        return new Result(1,"操作失败",data);
    }
}
